package xinxin.com.MediatorPattern.UnitedNations;

import xinxin.com.MediatorPattern.Country.Country;
import xinxin.com.MediatorPattern.Country.Detail.Iraq;
import xinxin.com.MediatorPattern.Country.Detail.USA;

/**
 * @author ：史鑫鑫
 * @date ：Created in 2019/4/1 22:43
 */
public class UnitedNationsSecurityCouncil extends UnitedNations {
    private USA usa;
    private Iraq iraq;

    public void setUsa(USA usa) {
        this.usa = usa;
    }

    public void setIraq(Iraq iraq) {
        this.iraq = iraq;
    }

    @Override
    public void Declare(String message, Country country) {
        if (country == usa) {
            iraq.GetMessage(message);
        } else {
            usa.GetMessage(message);
        }
    }
}
